package com.ruoyi.framework.multiTenant;

// 创建租户上下文类，用于存储当前线程的学院ID
public class CollegeTenantContext {
    private static ThreadLocal<Integer> currentCollegeId = new ThreadLocal<>();

    public static void setCollegeId(Integer collegeId) {
        currentCollegeId.set(collegeId);
    }

    public static Integer getCollegeId() {
        return currentCollegeId.get();
    }

    public static void clear() {
        currentCollegeId.remove();
    }
}
